import Phaser from "phaser";
import { BootScene } from "./scenes/BootScene";
import { PlayScene } from "./scenes/PlayScene";
import { MenuScene } from "./scenes/MenuScene";

const originLayerWidth = 480;
const originLayerHeight = 320;

export const common_scale   = 1;
export const rotation_delta = 0.065;

const config: Phaser.Types.Core.GameConfig = {
    title: 'Tank',
    version: '0.0.1',
    width: originLayerWidth*common_scale,
    height: originLayerHeight*common_scale,
    type: Phaser.AUTO,
    parent: 'game',
    scene: [BootScene, MenuScene, PlayScene],
    input: {
        keyboard: true
    },

    physics: {
        default: 'arcade',
        arcade: {
            gravity: { y: 0, x: 0 },
            debug: false
        }
    }
};

window.addEventListener('load', () => new Phaser.Game(config))